Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Transforms

QuickDraw 3D provides routines that you can use to manage transforms.

Q3Transform_GetType

You can use the Q3Transform_GetType function to get the type of a transform object.

TQ3ObjectType Q3Transform_GetType (TQ3TransformObject transform);
transform
A transform.

DESCRIPTION

The Q3Transform_GetType function returns, as its function result, the type of the transform object specified by the transform parameter. The types of transform objects currently supported by QuickDraw 3D are defined by these constants:

kQ3TransformTypeMatrix
kQ3TransformTypeQuaternion
kQ3TransformTypeRotate
kQ3TransformTypeRotateAboutAxis
kQ3TransformTypeRotateAboutPoint
kQ3TransformTypeScale
kQ3TransformTypeTranslate

If the specified transform object is invalid or is not one of these types, Q3Transform_GetType returns the value kQ3ObjectTypeInvalid .

Q3Transform_GetMatrix

You can use the Q3Transform_GetMatrix function to get the matrix representation of a transform.

TQ3Matrix4x4 *Q3Transform_GetMatrix (
                     TQ3TransformObject transform,
                     TQ3Matrix4x4 *matrix);
transform
A transform.
matrix
On exit, a pointer to the matrix that represents the transform specified in the transform parameter.

DESCRIPTION

The Q3Transform_GetMatrix function returns, in the matrix parameter and as its function result, the matrix that represents the transform specified by the transform parameter. The caller is responsible for allocating the memory pointed to by matrix .

Q3Transform_Submit

You can use the Q3Transform_Submit function to submit a transform.

TQ3Status Q3Transform_Submit (
                     TQ3TransformObject transform,
                     TQ3ViewObject view);
transform
A transform.
view
A view.

DESCRIPTION

The Q3Transform_Submit function pushes the transform specified by the transform parameter onto the view transform stack of the specified view. Q3Transform_Submit returns kQ3Success if the operation succeeds and kQ3Failure otherwise.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |